import Vue from 'vue'
import Vuex from 'vuex'
import {login} from "./login"
import createPersistedState from "vuex-persistedstate";
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    
  },
  getters: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    login
  },
  plugins: [
    createPersistedState({
      storage:window.localStorage,
      key: "token",
      reducer(val){
        return val.login.token
      }
    })
  ]
})
